#include<iostream>
using namespace std;
typedef long long LL;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		int x, a, y, b;
		cin >> x >> a >> y >> b;
		LL sum1 = (LL) x* (a + 1) / 2;
		LL sum2 = (LL) y* (b + 1) / 2;
		if (sum1 == sum2) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}